package com.foodchain.entity;

import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @ClassName ProductOrder
 * @Description TODO
 * @Author duyuanyuan
 * @Date 2019/3/1216:04
 * @Version 1.0
 **/
@Entity
@Data
@Table(name = "product_order")
public class ProductOrder implements Serializable {

    private static final long serialVersionUID = 7458464050905240379L;
    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid",strategy = "uuid")
    private String id;

    @Column(name = "product_id")
    private String productId;

    @Column(name = "product_name")
    private String productName;

    @Column(name = "user_id")
    private String userId;

    @Column(name = "product_count")
    private Integer productCount;

    @Column(name = "product_price")
    private Integer productPrice;

    @Column(name = "product_total")
    private Integer productTotal;

    @Column(name = "product_order_number")
    private String OrderNumber;

    @Column(name = "user_phone")
    private String userPhone;

    @Column(name = "user_address")
    private String userAddress;

    @Column(name = "order_status")
    private Integer orderStatus;

    @Column(name = "create_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @Column(name = "cancel_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date cancelTime;

}
